package org.jeecg.modules.system.util;

import java.security.SecureRandom;
import java.util.Random;

public class IpHostUtil {

    /**
     * 生成15位随机数
     * @return
     */
    public static String getGUID() {
        Random ran=new Random();
        int a=ran.nextInt(99999999);
        int b=ran.nextInt(99999999);
        long l=a*10000000L+b;
        String num=String.valueOf(l);
        return num;
    }

    public static String getCId(String machineId){
        String orderId =
                machineId +
                        (System.currentTimeMillis() + "").substring(1) +
                        (System.nanoTime() + "").substring(7, 10);
        return orderId;
    }
}
